package com.bishe.psy.dao;

import com.bishe.psy.model.Message;
import com.bishe.psy.model.StuUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: L
 * Date: 2024-04-30
 * Time: 12:10
 */

@Mapper
public interface MessageMapper {

    int insertSelective(Message row);

    Message selectByPrimaryKey(Long id);

    //查询未读的信息
    Integer selectUnreadCount(Long receiveUserId,Long currentIdentity);

    //根据接收者用户id查询所有站内信(咨询师页面)
    List<Message> selectByReceiveUserId(Long receiveUserId);

    int updateByPrimaryKeySelective(Message row);

    //根据接收者用户id查询所有站内信(学生页面)
    List<Message> selectByReceiveUserIdStu(Long receiveUserId);


}
